import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token' // 设置本地存储token

const Time = 'StartTime' // 设置本地时间戳

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

// 获取时间
export const getTime = () => Cookies.get(Time)

// 设置时间
export const setTime = () => Cookies.set(Time, Date.now())
